home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / widget / nsIClipboard.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  11KB  |  289 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIClipboard.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIClipboard_h__
  6. #define __gen_nsIClipboard_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsISupportsArray_h__
  14. #include "nsISupportsArray.h"
  15. #endif
  16.  
  17. #ifndef __gen_nsITransferable_h__
  18. #include "nsITransferable.h"
  19. #endif
  20.  
  21. #ifndef __gen_nsIClipboardOwner_h__
  22. #include "nsIClipboardOwner.h"
  23. #endif
  24.  
  25. /* For IDL files that don't want to include root IDL files. */
  26. #ifndef NS_NO_VTABLE
  27. #define NS_NO_VTABLE
  28. #endif
  29.  
  30. /* starting interface:    nsIClipboard */
  31. #define NS_ICLIPBOARD_IID_STR "8b5314ba-db01-11d2-96ce-0060b0fb9956"
  32.  
  33. #define NS_ICLIPBOARD_IID \
  34.   {0x8b5314ba, 0xdb01, 0x11d2, \
  35.     { 0x96, 0xce, 0x00, 0x60, 0xb0, 0xfb, 0x99, 0x56 }}
  36.  
  37. class NS_NO_VTABLE nsIClipboard : public nsISupports {
  38.  public: 
  39.  
  40.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICLIPBOARD_IID)
  41.  
  42.   enum { kSelectionClipboard = 0 };
  43.  
  44.   enum { kGlobalClipboard = 1 };
  45.  
  46.   /**
  47.     * Given a transferable, set the data on the native clipboard
  48.     *
  49.     * @param  aTransferable The transferable
  50.     * @param  anOwner The owner of the transferable
  51.     * @param  aWhichClipboard Specifies the clipboard to which this operation applies.
  52.     * @result NS_Ok if no errors
  53.     */
  54.   /* void setData (in nsITransferable aTransferable, in nsIClipboardOwner anOwner, in long aWhichClipboard); */
  55.   NS_IMETHOD SetData(nsITransferable *aTransferable, nsIClipboardOwner *anOwner, PRInt32 aWhichClipboard) = 0;
  56.  
  57.   /**
  58.     * Given a transferable, get the clipboard data.
  59.     *
  60.     * @param  aTransferable The transferable
  61.     * @param  aWhichClipboard Specifies the clipboard to which this operation applies.
  62.     * @result NS_Ok if no errors
  63.     */
  64.   /* void getData (in nsITransferable aTransferable, in long aWhichClipboard); */
  65.   NS_IMETHOD GetData(nsITransferable *aTransferable, PRInt32 aWhichClipboard) = 0;
  66.  
  67.   /**
  68.     * This empties the clipboard and notifies the clipboard owner.
  69.     * This empties the "logical" clipboard. It does not clear the native clipboard.
  70.     *
  71.     * @param  aWhichClipboard Specifies the clipboard to which this operation applies.
  72.     * @result NS_OK if successful.
  73.     */
  74.   /* void emptyClipboard (in long aWhichClipboard); */
  75.   NS_IMETHOD EmptyClipboard(PRInt32 aWhichClipboard) = 0;
  76.  
  77.   /**
  78.     * This provides a way to give correct UI feedback about, for instance, a paste 
  79.     * should be allowed. It does _NOT_ actually retreive the data and should be a very
  80.     * inexpensive call. All it does is check if there is data on the clipboard matching
  81.     * any of the flavors in the given list.
  82.     *
  83.     * @aFlavorList - nsISupportsCString's in a nsISupportsArray (for JavaScript).
  84.     * @param  aWhichClipboard Specifies the clipboard to which this operation applies.
  85.     * @outResult - if data is present matching one of 
  86.     * @result NS_OK if successful.
  87.     */
  88.   /* boolean hasDataMatchingFlavors (in nsISupportsArray aFlavorList, in long aWhichClipboard); */
  89.   NS_IMETHOD HasDataMatchingFlavors(nsISupportsArray *aFlavorList, PRInt32 aWhichClipboard, PRBool *_retval) = 0;
  90.  
  91.   /**
  92.     * Allows clients to determine if the implementation supports the concept of a 
  93.     * separate clipboard for selection.
  94.     * 
  95.     * @outResult - true if 
  96.     * @result NS_OK if successful.
  97.     */
  98.   /* boolean supportsSelectionClipboard (); */
  99.   NS_IMETHOD SupportsSelectionClipboard(PRBool *_retval) = 0;
  100.  
  101. };
  102.  
  103. /* Use this macro when declaring classes that implement this interface. */
  104. #define NS_DECL_NSICLIPBOARD \
  105.   NS_IMETHOD SetData(nsITransferable *aTransferable, nsIClipboardOwner *anOwner, PRInt32 aWhichClipboard); \
  106.   NS_IMETHOD GetData(nsITransferable *aTransferable, PRInt32 aWhichClipboard); \
  107.   NS_IMETHOD EmptyClipboard(PRInt32 aWhichClipboard); \
  108.   NS_IMETHOD HasDataMatchingFlavors(nsISupportsArray *aFlavorList, PRInt32 aWhichClipboard, PRBool *_retval); \
  109.   NS_IMETHOD SupportsSelectionClipboard(PRBool *_retval); 
  110.  
  111. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  112. #define NS_FORWARD_NSICLIPBOARD(_to) \
  113.   NS_IMETHOD SetData(nsITransferable *aTransferable, nsIClipboardOwner *anOwner, PRInt32 aWhichClipboard) { return _to SetData(aTransferable, anOwner, aWhichClipboard); } \
  114.   NS_IMETHOD GetData(nsITransferable *aTransferable, PRInt32 aWhichClipboard) { return _to GetData(aTransferable, aWhichClipboard); } \
  115.   NS_IMETHOD EmptyClipboard(PRInt32 aWhichClipboard) { return _to EmptyClipboard(aWhichClipboard); } \
  116.   NS_IMETHOD HasDataMatchingFlavors(nsISupportsArray *aFlavorList, PRInt32 aWhichClipboard, PRBool *_retval) { return _to HasDataMatchingFlavors(aFlavorList, aWhichClipboard, _retval); } \
  117.   NS_IMETHOD SupportsSelectionClipboard(PRBool *_retval) { return _to SupportsSelectionClipboard(_retval); } 
  118.  
  119. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  120. #define NS_FORWARD_SAFE_NSICLIPBOARD(_to) \
  121.   NS_IMETHOD SetData(nsITransferable *aTransferable, nsIClipboardOwner *anOwner, PRInt32 aWhichClipboard) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetData(aTransferable, anOwner, aWhichClipboard); } \
  122.   NS_IMETHOD GetData(nsITransferable *aTransferable, PRInt32 aWhichClipboard) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aTransferable, aWhichClipboard); } \
  123.   NS_IMETHOD EmptyClipboard(PRInt32 aWhichClipboard) { return !_to ? NS_ERROR_NULL_POINTER : _to->EmptyClipboard(aWhichClipboard); } \
  124.   NS_IMETHOD HasDataMatchingFlavors(nsISupportsArray *aFlavorList, PRInt32 aWhichClipboard, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasDataMatchingFlavors(aFlavorList, aWhichClipboard, _retval); } \
  125.   NS_IMETHOD SupportsSelectionClipboard(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SupportsSelectionClipboard(_retval); } 
  126.  
  127. #if 0
  128. /* Use the code below as a template for the implementation class for this interface. */
  129.  
  130. /* Header file */
  131. class nsClipboard : public nsIClipboard
  132. {
  133. public:
  134.   NS_DECL_ISUPPORTS
  135.   NS_DECL_NSICLIPBOARD
  136.  
  137.   nsClipboard();
  138.  
  139. private:
  140.   ~nsClipboard();
  141.  
  142. protected:
  143.   /* additional members */
  144. };
  145.  
  146. /* Implementation file */
  147. NS_IMPL_ISUPPORTS1(nsClipboard, nsIClipboard)
  148.  
  149. nsClipboard::nsClipboard()
  150. {
  151.   /* member initializers and constructor code */
  152. }
  153.  
  154. nsClipboard::~nsClipboard()
  155. {
  156.   /* destructor code */
  157. }
  158.  
  159. /* void setData (in nsITransferable aTransferable, in nsIClipboardOwner anOwner, in long aWhichClipboard); */
  160. NS_IMETHODIMP nsClipboard::SetData(nsITransferable *aTransferable, nsIClipboardOwner *anOwner, PRInt32 aWhichClipboard)
  161. {
  162.     return NS_ERROR_NOT_IMPLEMENTED;
  163. }
  164.  
  165. /* void getData (in nsITransferable aTransferable, in long aWhichClipboard); */
  166. NS_IMETHODIMP nsClipboard::GetData(nsITransferable *aTransferable, PRInt32 aWhichClipboard)
  167. {
  168.     return NS_ERROR_NOT_IMPLEMENTED;
  169. }
  170.  
  171. /* void emptyClipboard (in long aWhichClipboard); */
  172. NS_IMETHODIMP nsClipboard::EmptyClipboard(PRInt32 aWhichClipboard)
  173. {
  174.     return NS_ERROR_NOT_IMPLEMENTED;
  175. }
  176.  
  177. /* boolean hasDataMatchingFlavors (in nsISupportsArray aFlavorList, in long aWhichClipboard); */
  178. NS_IMETHODIMP nsClipboard::HasDataMatchingFlavors(nsISupportsArray *aFlavorList, PRInt32 aWhichClipboard, PRBool *_retval)
  179. {
  180.     return NS_ERROR_NOT_IMPLEMENTED;
  181. }
  182.  
  183. /* boolean supportsSelectionClipboard (); */
  184. NS_IMETHODIMP nsClipboard::SupportsSelectionClipboard(PRBool *_retval)
  185. {
  186.     return NS_ERROR_NOT_IMPLEMENTED;
  187. }
  188.  
  189. /* End of implementation class template. */
  190. #endif
  191.  
  192.  
  193. /* starting interface:    nsIClipboardImage */
  194. #define NS_ICLIPBOARDIMAGE_IID_STR "db21eb6c-aebb-4d16-94ec-bcd8bbf513ae"
  195.  
  196. #define NS_ICLIPBOARDIMAGE_IID \
  197.   {0xdb21eb6c, 0xaebb, 0x4d16, \
  198.     { 0x94, 0xec, 0xbc, 0xd8, 0xbb, 0xf5, 0x13, 0xae }}
  199.  
  200. class NS_NO_VTABLE nsIClipboardImage : public nsISupports {
  201.  public: 
  202.  
  203.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICLIPBOARDIMAGE_IID)
  204.  
  205.   /* [noscript] void setNativeImage (in voidPtr aNativeImageData); */
  206.   NS_IMETHOD SetNativeImage(void * aNativeImageData) = 0;
  207.  
  208.   /* [noscript] void getNativeImage (in voidPtr aNativeImageData); */
  209.   NS_IMETHOD GetNativeImage(void * aNativeImageData) = 0;
  210.  
  211.   /* [noscript] void releaseNativeImage (in voidPtr aNativeImageData); */
  212.   NS_IMETHOD ReleaseNativeImage(void * aNativeImageData) = 0;
  213.  
  214. };
  215.  
  216. /* Use this macro when declaring classes that implement this interface. */
  217. #define NS_DECL_NSICLIPBOARDIMAGE \
  218.   NS_IMETHOD SetNativeImage(void * aNativeImageData); \
  219.   NS_IMETHOD GetNativeImage(void * aNativeImageData); \
  220.   NS_IMETHOD ReleaseNativeImage(void * aNativeImageData); 
  221.  
  222. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  223. #define NS_FORWARD_NSICLIPBOARDIMAGE(_to) \
  224.   NS_IMETHOD SetNativeImage(void * aNativeImageData) { return _to SetNativeImage(aNativeImageData); } \
  225.   NS_IMETHOD GetNativeImage(void * aNativeImageData) { return _to GetNativeImage(aNativeImageData); } \
  226.   NS_IMETHOD ReleaseNativeImage(void * aNativeImageData) { return _to ReleaseNativeImage(aNativeImageData); } 
  227.  
  228. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  229. #define NS_FORWARD_SAFE_NSICLIPBOARDIMAGE(_to) \
  230.   NS_IMETHOD SetNativeImage(void * aNativeImageData) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNativeImage(aNativeImageData); } \
  231.   NS_IMETHOD GetNativeImage(void * aNativeImageData) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNativeImage(aNativeImageData); } \
  232.   NS_IMETHOD ReleaseNativeImage(void * aNativeImageData) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReleaseNativeImage(aNativeImageData); } 
  233.  
  234. #if 0
  235. /* Use the code below as a template for the implementation class for this interface. */
  236.  
  237. /* Header file */
  238. class nsClipboardImage : public nsIClipboardImage
  239. {
  240. public:
  241.   NS_DECL_ISUPPORTS
  242.   NS_DECL_NSICLIPBOARDIMAGE
  243.  
  244.   nsClipboardImage();
  245.  
  246. private:
  247.   ~nsClipboardImage();
  248.  
  249. protected:
  250.   /* additional members */
  251. };
  252.  
  253. /* Implementation file */
  254. NS_IMPL_ISUPPORTS1(nsClipboardImage, nsIClipboardImage)
  255.  
  256. nsClipboardImage::nsClipboardImage()
  257. {
  258.   /* member initializers and constructor code */
  259. }
  260.  
  261. nsClipboardImage::~nsClipboardImage()
  262. {
  263.   /* destructor code */
  264. }
  265.  
  266. /* [noscript] void setNativeImage (in voidPtr aNativeImageData); */
  267. NS_IMETHODIMP nsClipboardImage::SetNativeImage(void * aNativeImageData)
  268. {
  269.     return NS_ERROR_NOT_IMPLEMENTED;
  270. }
  271.  
  272. /* [noscript] void getNativeImage (in voidPtr aNativeImageData); */
  273. NS_IMETHODIMP nsClipboardImage::GetNativeImage(void * aNativeImageData)
  274. {
  275.     return NS_ERROR_NOT_IMPLEMENTED;
  276. }
  277.  
  278. /* [noscript] void releaseNativeImage (in voidPtr aNativeImageData); */
  279. NS_IMETHODIMP nsClipboardImage::ReleaseNativeImage(void * aNativeImageData)
  280. {
  281.     return NS_ERROR_NOT_IMPLEMENTED;
  282. }
  283.  
  284. /* End of implementation class template. */
  285. #endif
  286.  
  287.  
  288. #endif /* __gen_nsIClipboard_h__ */
  289.